/*
 *************************************************************************
 *西瑞克斯通信技术股份有限公司研发管理系统
 *版 本: 1.0   
 *日 期：02/05/2012    
 *作 者： 王浩 QQ:873987060   
 *************************************************************************   
 */
package com.application.yfproject.service;

import java.util.List;

import com.application.yfproject.dao.YfProjectDAO;
import com.application.yfproject.entity.YfProject;
import com.application.yfproject.struts.form.YfProjectForm;
import com.manager.BaseService;
import com.manager.commons.page.PageBean;

/**
 * 
 * 
 * Description:YfProjectService<br />
 * 
 * Version:V0.1<br />
 * 
 * Author: Code Generator <br />
 * 
 * History: <br />
 * 
 * 02/05/2012 王浩.
 * 
 */
public class YfProjectService extends BaseService {
	private YfProjectDAO yfProjectDAO;

	public YfProjectDAO getYfProjectDAO() {
		return this.yfProjectDAO;
	}

	public void setYfProjectDAO(YfProjectDAO yfProjectDAO) {
		this.yfProjectDAO = yfProjectDAO;
	}

	public YfProject getYfProject(YfProject yfProject) {
		return (YfProject) this.getBaseDao().queryByPk(yfProject,
				yfProject.getId());
	}

	public Integer getAllCountYfProject(YfProjectForm yfProjectForm) {
		return this.yfProjectDAO.getAllCountYfProject(yfProjectForm);
	}

	public List<YfProject> searchYfProject(YfProjectForm yfProjectForm,
			PageBean pageBean) throws Exception {
		List<YfProject> yfProjectList = (List) this.yfProjectDAO
				.searchYfProject(yfProjectForm, pageBean);
		return yfProjectList;
	}
	
	
	public Integer getAllCountYfProjectXMST(YfProjectForm yfProjectForm) {
		return this.yfProjectDAO.getAllCountYfProjectXMST(yfProjectForm);
	}

	public List<YfProject> searchYfProjectXMST(YfProjectForm yfProjectForm,
			PageBean pageBean) throws Exception {
		List<YfProject> yfProjectList = (List) this.yfProjectDAO
				.searchYfProjectXMST(yfProjectForm, pageBean);
		return yfProjectList;
	}

	public boolean isProjectManager(String userid){
		return yfProjectDAO.isProjectManager(userid);
	}
	public synchronized  String getMaxProjectNo(String pix ){
		return yfProjectDAO.getMaxProjectNo(pix );
	}
	public void deleteYfProjects(YfProjectForm yfProjectForm) {
		this.yfProjectDAO.deleteYfProjects(yfProjectForm);
	}
}
